<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="redis" uri="http://www.shopjsp.com/redisTag/functions" %>
<c:set var="basePath" value="${redis:getSysConfig('base_path_back')}"/>
<script type="text/javascript">
    /**
     * 金币流水详情
     */
    function detailInfo(id){
        $.ajax({
            type: "POST",
            dataType: "JSON",
            url: "${basePath}/back/mallCoin/getVirtualCoinById.sjson",
            data: {mallCoinId:id},
            success: function(result){
                var data = JSON.parse(result.data);
                /**重置详情页中所有html展示信息**/
                resetDetailTable("detailTable");
                /**设置展示信息**/
                $("#d_loginName").html(data[0].loginName);
                $("#d_ordersNo").html(data[0].ordersNo);
                $("#d_serialNumber").html(data[0].serialNumber);
                if (data[0].type==1){
                    $("#d_type").html("<font class='color_001'>收入</font>");
				} else if (data[0].type==2){
                    $("#d_type").html("<font class='color_002'>支出</font>");
                }
                $("#d_transactionNumber").html(data[0].transactionNumber);
                if(data[0].tradeTime!=""&&data[0].tradeTime!=undefined){
                    $("#d_tradeTime").html(new Date(data[0].tradeTime).Format("yyyy-MM-dd hh:mm:ss"));
                }
                if(data[0].operatorTime!=""&&data[0].operatorTime!=undefined){
                    $("#d_operatorTime").html(new Date(data[0].operatorTime).Format("yyyy-MM-dd hh:mm:ss"));
                }
                $("#d_remarks").html(data[0].remarks);
                $("#d_frozenNumber").html(data[0].frozenNumber);
                $("#d_proportion").html(data[0].proportion);
                if (data[0].source==1){
                    $("#d_source").html("注册送");
                }else if (data[0].source==2){
                    $("#d_source").html("购物送");
                }else if (data[0].source==3){
                    $("#d_source").html("分享注册成功送");
                }else if (data[0].source==4){
                    $("#d_source").html("取消订单返");
                }else if (data[0].source==5){
                    $("#d_source").html("退货返");
                }else if (data[0].source==6){
                    $("#d_source").html("买商品抵扣");
                }else if (data[0].source==7){
                    $("#d_source").html("签到");
                }
            }
        });
    }
</script>

<!--详情模态框（Modal） -->
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
	<div class="modal-dialog" style="width:70%">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h5 class="modal-title" id="myModalLabel">金币流水详情</h5>
			</div>
			<div class="modal-body">
				<table id="detailTable" align="center" class="addOrEditTable table table-bordered" style="width:100%;">
					<tr>
						<td class="toright_td" width="150px">会员名称:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_loginName"></span></td>
						<td class="toright_td" width="150px">订单号:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_ordersNo"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">流水号:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_serialNumber"></span></td>
						<td class="toright_td" width="150px">收支类型:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_type"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">交易数量:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_transactionNumber"></span></td>
						<td class="toright_td" width="150px">交易时间:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_tradeTime"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">冻结数量:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_frozenNumber"></span></td>
						<td class="toright_td" width="150px">操作时间:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_operatorTime"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">当时分享比例:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_proportion"></span></td>
						<td class="toright_td" width="150px">来源:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_source"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">备注:</td><td  class="toleft_td"  colspan="3">&nbsp;&nbsp;<span id="d_remarks"></span></td>
					</tr>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>
